/**
 * @file SlipReactionPlanner.h
 * @author  
 * @brief 打滑行为规划
 * @version 1.0
 * @date 2021-08-11
 * 
 * @copyright Copyright (c) 2021
 * 
 */

#pragma once

namespace behavior_controller
{
    class SlipReactionPlanner
    {
        public:
            SlipReactionPlanner(){};
            void run(double &linear_vel, double &angular_vel);

        private:
            void Back(double &linear_vel, double &angular_vel);
            void Turn(double &linear_vel, double &angular_vel);
            void Back_Turn(double turn_angle,double &linear_vel, double &angular_vel);
            void Back_Forward_Speed_Up (double &linear_vel, double &angular_vel);   
            double time_now = 0;   //用于进行时间赋值的标记，如果时间为0,才会获取当前时间，以免下个周期到来时，时间变为最新时间
            double last_angle;
        public:
            bool finished=true;
    };

    //static 
    extern SlipReactionPlanner slip_reaction_planner;
} 
